﻿import QtQuick 2.0
import "../chromatogram"
import "../components"


Rectangle {

    color: Qt.rgba(233/255, 230/255, 224/255, 1)
    radius: 5*dp

    property bool largeMode: width > 2*height


    Chromatogram{
        id: chromatogram
        height: largeMode ? (parent.height - 55*dp) : (parent.height - 85*dp)
        width: parent.width - 2*x
        x: 0; y: largeMode ? 8*dp : 38*dp
    }
    Text{
        x: 20*dp; y: 20*dp
        height: 20*dp; width: 120*dp
        font.pixelSize: config.fontsize + 5*dp
        text: "能谱图"
        font.bold: true
    }
    CustomButton{
        title: "导出"
        defaultMode1: true
        x: parent.width - width - 30*dp
        y: parent.height - height - 20*dp
    }
    Rectangle{
        anchors.horizontalCenter: parent.horizontalCenter
        height: 40*dp; width: 240*dp
//        y: largeMode ? 30*dp : 60*dp
        y: chromatogram.y + chromatogram.chartY - height - 14*dp
        border.color: "#AA444444"
        radius: 5*dp
        Text{
            anchors.centerIn: parent
            text: "阈值:30  |  峰值:90"
            font.pixelSize: config.fontsize
            color: "#555"
        }
    }
}
